
import { baseUrlConfig } from '@/config/config';
import request from '@/utils/request'

const bastPath = baseUrlConfig.processBaseUrl

//回收站列表分页查询
export const recyclePageList = (data: any) => {
  return request({
    url: bastPath + '/knowledge/documentRecycle/find/page',
    method: 'post',
    data
  })
};

// 设置回收时长
export const setStorageTime = (data: any) => {
    return request({
        url: bastPath + '/knowledge/documentRecycle/update',
        method: 'put',
        data
    })
};

// 恢复文件
export const restoreFilesInterface = (data: any) => {
    return request({
        url: bastPath + '/knowledge/documentRecycle/recover',
        method: 'put',
        data
    })
};

// 单个删除
export const deleteRecycleFiles = (id:any) => {
    return request({
        url: bastPath + `/knowledge/documentRecycle/delete/${id}`,
        method: 'delete',
    })
};

// 清空回收站
export const emptyRecycleBin = (userId:any) => {
    return request({
        url: bastPath + `/knowledge/documentRecycle/deleteAll?userId=${userId}`,
        method: 'delete',
    })
};

// 获取回收设置
export const getRecycleSettings = (userId:any) => {
    return request({
        url: bastPath + `/knowledge/documentRecycle/getRecycleSettings/${userId}`,
        method: 'get',
    })
};